public class Solution {
    public static void main(String[] args) {
        int[] nums = {1,2,3,4,5,6,7};
    }
    //轮转数组
    //超时解法
    public static void rotate1(int[] nums, int k) {
        int n = nums.length;
        //数组整体移动k次
        for(int i = 0; i < k; i++) {
            int tmp = nums[n-1];
            for(int j = n-1; j > 0; j--) {
                nums[j] = nums[j-1];
            }
            nums[0] = tmp;
        }
    }
    
}
